<?php
/*
 *author:Yangligao
 *Date:2013-9-20
 *
 *本项目采用大驼峰命名 :所有文件
 */
session_start();
header("Content-Type:text/html;charset=utf-8");
define("ROOT", str_replace("\\", "/", dirname(__FILE__)));
//D:/myenv/apache/htdocs/coming
//自动加载类
set_include_path(ROOT."/MyClass/");
function __autoload($className){
	require $className.'.class.php';
}

define('DBHOST', '127.0.0.1');
define('DBUSER', 'root');
define('DBPWD', 'root');
define('DBNAME', 'comming');
Db::instance(DBHOST, DBUSER, DBPWD, DBNAME);

/*跳转函数文件*/
require ROOT.'/Public/function.php';

require ROOT.'/Public/Smarty/Smarty.class.php';
define("TMPL", ROOT."/Tpl/");//这个路径总的来说是相对于主文件来的
define("TMPLC", ROOT."/Runtime~/");
define("LEFT", "<{");
define("RIGHT", "}>");

$smarty = new Smarty();
$smarty->template_dir=TMPL;
$smarty->compile_dir=TMPLC;

$smarty->left_delimiter = LEFT;
$smarty->right_delimiter = RIGHT;

?>
